---
title: clsCaseNotesManager
summary: API reference for clsCaseNotesManager.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Application.Claim.Legal
reference_type: embedded
---

# clsCaseNotesManager

`clsCaseNotesManager` performs CRUD on case notes for the current legal case and enforces role-based restrictions on who may edit or delete a note. Bill notes (`DOCCO`) and system-generated notes are treated differently from ordinary notes: deletion is blocked for non-privileged users and is always blocked for notes created by `"SYSTEM"` ([Business rules](../../business-rules.md)). It inherits `LegalManagerBase` (this library) → `ClaimAppManager` (`SAIF.Application.Claim`).

## Purpose
- Create, read, update, and delete case notes for the current legal case.
- Restrict note deletion to users in the case-update/admin group, with a narrower allowance for bill-note updaters on bill notes, and an absolute block on system-created notes ([Business rules](../../business-rules.md)).
- Gate note view/update capability by security role, computing `CanUpdate`/`CanUpdateText` flags per note when notes are loaded or created ([Business rules](../../business-rules.md)).

## Context
- Namespace: `SAIF.Application.Claim.Legal`
- Assembly/package: `SAIF.Application.Claim.Legal.dll` (embedded library, referenced by the `Legal` web front end)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `New(inDatabase, inSecurityPrincipal)` | `Public Sub New(inDatabase As String, inSecurityPrincipal As clsSecurityPrincipal)` | Constructs the manager for the given database context and authenticated principal, calling into `LegalManagerBase.New`. |
| `CaseNotes` | `Public ReadOnly Property CaseNotes As clsCaseNoteCollection`* | Exposes the case-note collection for the current legal case. |
| `DeleteNote()` | `Public Sub DeleteNote()` | Deletes the selected case note, blocking the operation with an error message when the caller lacks the required role or the note was created by `"SYSTEM"` ([Business rules](../../business-rules.md)). |
| `IsInNoteView` | `Public ReadOnly Property IsInNoteView As Boolean` | Indicates whether the current user holds the `LNNoteView` security key, gating note-viewing capability ([Business rules](../../business-rules.md)). |
| `CanUpdateBillNotes` | `Public ReadOnly Property CanUpdateBillNotes As Boolean` | Indicates whether the current user holds the `LNUpdate` security key, gating bill-note (`DOCCO`) edit/delete capability ([Business rules](../../business-rules.md)). |
| `CanUpdateAnyNote` | `Public ReadOnly Property CanUpdateAnyNote As Boolean` | Indicates whether the current user is in the admin or case-update security group, granting edit/delete on any note regardless of category ([Business rules](../../business-rules.md)). |
| `Save()` | `Public Overrides Function Save() As Boolean`* | Persists pending case-note inserts/edits/deletes via the inherited `clsBusinessBase.Save()` dispatch path. |

## Behavioral notes
- `DeleteNote()` combines three checks — general update role, bill-note-specific role, and system-authorship — such that a `"SYSTEM"`-created note can never be deleted regardless of caller role ([Business rules](../../business-rules.md)).
- `CanUpdate`/`CanUpdateText` flags are computed per note at load/create time based on `IsInNoteView`/`CanUpdateBillNotes`/`CanUpdateAnyNote`, so the UI can render edit controls consistently with server-side enforcement ([Business rules](../../business-rules.md)).

## Constraints and usage notes
- Callers must not assume client-side note edit controls reflect authorization on their own — `DeleteNote()` re-checks role/authorship server-side before deleting*.

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts.

## Sources
- `SAIF.Application.Claim.Legal\LegalNet\clsCaseNotesManager.vb`
